import { createApp } from 'vue';
import '@/theme/index.less'; // 引入全局样式
import * as AntIcons from '@ant-design/icons-vue'; // 引入图标库
import { router } from '@/router'; //引入路由
import { store } from './store'; // 引入 pinia 状态管理

import App from './App.vue'; //引入App.vue 组件
import { setupErrorHandler } from './utils/error'; //全局异常处理

async function initValue() {
  const vueApp = createApp(App);
  const app = vueApp.use(router).use(store);
  app.config.globalProperties.$antIcons = AntIcons;
  setupErrorHandler(app); //注册全局异常
  app.mount('#app');
}
initValue();
